package timberman.screens;


import timberman.character.GameInfo;
import timberman.core.MyGame;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.assets.loaders.SkinLoader.SkinParameter;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;

public class SplashScreen implements Screen {
	MyGame game;

	public SplashScreen() {
		game = MyGame.getInstance();
	}

	@Override
	public void show() {
		game.manager.load("data/graphics/uiskin.json", Skin.class,
				new SkinParameter("data/graphics/img.pack"));
		game.manager.load(GameInfo.MAN_NIMATION, TextureAtlas.class);
	}

	@Override
	public void render(float delta) {
		Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
		Gdx.gl.glClearColor(1f, 1f, 1f, 0.3f);

		if (game.manager.update()) {
			game.setScreen(TestScreen.getInstance());
			
		}
	}

	@Override
	public void resize(int width, int height) {
		// TODO Auto-generated method stub

	}

	@Override
	public void hide() {
		// TODO Auto-generated method stub

	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub

	}

	@Override
	public void resume() {
		// TODO Auto-generated method stub

	}

	@Override
	public void dispose() {
		// TODO Auto-generated method stub

	}

}
